<template>
	<video :src="url" 
	:poster="poster"
	:enable-play-gesture="true"
	play-btn-position="center"
	class="video-box"></video>
</template>

<script>
	export default {
		data() {
			return {
				// url: '' ,// 初始化 url
				url: '',
				poster: '',
			}
		},
		onLoad(options) { // 使用 onLoad 生命周期钩子获取参数
			if(options.videoUrlFromParam) {
				
				const decodedParam = decodeURIComponent(options.videoUrlFromParam);
				console.log("decodedParam",decodedParam)
				const videoData = JSON.parse(decodedParam);
				this.url = videoData.src
				this.poster = videoData.poster
			}
			
		},
		onShow(){
		
		},
		methods: {

		}
	}
</script>
	
<style lang="scss" scoped>
	.video-box {
		width: 750rpx;
		height: 100%;
	}
	.msg{
		width: 100%;
		padding: 32rpx 24rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(0, 0, 0, 0.6);
		line-height: 40rpx;
		box-sizing: border-box;	
	}
</style>
